/*
 * Copyright (C) 2015 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

@import "base/environment";

#progression_modules {
  min-height: 450px;
  .message, .student-header {
    margin: 0;
    line-height: 1.2;
  }
  .collectionViewItems {
    list-style-type: none;
    margin: 0 0 $ic-sp;
    li {
      .progression-module {
        background-color: $lightBackground;
        padding: 0;
        .name, .status.no_subtitle {
          padding: $ic-sp;
        }
        .status {
          padding-right: 16px;
          text-align: right;
          .subtitle {
            color: $ic-hint-text;
            @include fontSize(12px);
            font-weight: normal;
          }
        }
        .completed {
          color: $successText;
        }
        hr {
          margin: 0;
          border-top-color: $ic-border-light;
        }
        .items {
          ul {
            list-style-type: none;
            padding: 6px 0px;
            li {
              padding: 6px 0px;
            }
          }
        }
      }
    }
  }
}

#progression_students {
  height: 450px;
  background-color: $lightBackground;
  border: 1px solid $ic-border-light;
  p {
    padding: 8px;
  }
  .header {
    border-bottom: solid 1px $ic-border-light;
    h3 {
      font-size: inherit;
      font-weight: bold;
      line-height: inherit;
      text-transform: uppercase;
      display: inline-block;
      line-height: 1.3;
      margin: 0;
    }
    a {
      float: right;
    }
  }
  .header, li {
    padding: $ic-sp/2 $ic-sp;
  }
  .collectionViewItems {
    list-style-type: none;
    margin-left: 0;
    overflow-y: auto;
    .student {
      cursor: pointer;
      border-top: solid 1px transparent;
      a {
        color: $ic-font-color-dark;
        box-sizing: border-box;
        width: 100%;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      &.active {
        font-weight: bold;
        background-color: $btnBackground;
        border-bottom: solid 1px $ic-border-light;
        margin-left: -1px;
        a { color: $ic-link-color; }
      }
    }
    .student + .student.active {
      border-top-color: $ic-border-light;
    }
  }
}

.module-progress-view {
  display: flex;
  box-sizing: border-box;
}

.module-progress-view__modules {
  flex: 1;
  box-sizing: border-box;
  padding-right: $ic-sp;
  @include breakpoint(desktop) { padding-right: $ic-sp*2; }
}

.module-progress-view__students {
  box-sizing: border-box;
  flex: 0 0 $ic-sp*16;
  @include breakpoint(desktop) { flex: 0 0 $ic-sp*20; }
}
